package com.lianqi.emcpframework.core.dict;

/**
 * @program emcp-framework
 * @ClassName DictParser
 * @description: 字典转换接口
 * @author: sky
 * @create: 2018/11/22 23:54
 */
public interface DictParser {

    String getId();

    /**
     * 转换为text
     * @param define 字典定义
     * @param value 字典值
     * @return 字典值对应text
     */
    String paserText(Dictionary define, Object value);

    /**
     * 转换为value
     * @param define 字典定义
     * @param text 字典text
     * @return 字典值
     */
    String parserValue(Dictionary define, String text);
}
